<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('模版类型')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-type" class="form-control selectpicker" name="row[message_type]">
                {foreach name="typeList" item="vo"}
                <option value="{$key|htmlentities}" {in name="key" value=""}selected{/in}>{$vo|htmlentities}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('masterplate')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-masterplate" class="form-control" name="row[masterplate]" placeholder="消息模版id" type="text" value="{$row.masterplate|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('详细内容')}:</label>
        <div class="col-xs-12 col-sm-8">

            <table class="table fieldlist" data-name="row[multiplejson]" data-template="row[multiplejson]tpl" id="second-table">
                <tr>
                    <td>{:__('字段名')}</td>
                    <td>{:__('微信关键词')}</td>
                    <td>{:__('介绍')}</td>
                    <td width="90">{:__('Operate')}</td>
                </tr>
                <tr><td colspan="3">
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a>
                    <textarea name="row[multiplejson]" class="form-control hide" cols="30" rows="5">{$row.multiplejson|htmlentities}</textarea>
                </td></tr>
            </table>
            <script type="text/html" id="row[multiplejson]tpl">
                <tr>
                    <td><input id="c-title" type="text" name="<%=name%>[<%=index%>][title]" class="form-control selectpage" data-source='[{"id":1,"title":"订单编号","type":1},{"id":2,"title":"联系人姓名","type":1},{"id":3,"title":"联系电话","type":1},{"id":4,"title":"门店名称","type":1},{"id":5,"title":"订单备注","type":1}]' data-order-by="id" data-field="title" value="<%=row.title%>" /></td>
                    <td><input type="text" name="<%=name%>[<%=index%>][keyword]" class="form-control" value="<%=row.keyword%>"/></td>
                    <td><input type="text" name="<%=name%>[<%=index%>][value]" class="form-control" value="<%=row.value%>"/></td>
                    <td width="90">
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </td>
                </tr>
            </script>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
